package com.idp.app.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.idp.app.dto.AppUserDto;
import com.idp.app.dto.AppUserSearchDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.idp.app.entity.AppUserEntity;

import java.util.List;

/**
 * APP用户Mapper
 * @author King
 */
@Mapper
public interface AppUserMapper extends BaseMapper<AppUserEntity> {

	/**
	 * 条件查询
	 * @param appUserSearchDto
	 * @return
	 */
	List<AppUserDto> getList(AppUserSearchDto appUserSearchDto);

	/**
	 * 通过id查询
	 * @param id
	 * @return
	 */
	AppUserDto getById(String id);

	/**
	 * 根据用户名、手机号、openid查询用户
	 * @param identity
	 * @return
	 */
	AppUserDto getUserByIdentity(@Param("identity") String identity);

	/**
	 * 根据手机号或openid查询用户
	 * @param phone
	 * @param openid
	 * @return
	 */
	AppUserDto getUserByPhoneOrOpenId(@Param("phone") String phone, @Param("openid") String openid);
}
